﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Windows;

using Microsoft.Shell;

using Hetymine.Executioner.Data.Console;

namespace Hetymine.Executioner {
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application, ISingleInstanceApp {
        #region ISingleInstanceApp Members
        public bool SignalExternalCommandLineArgs(IList<string> args) {
            if (args.Count > 1) {
                args.RemoveAt(0);
                Executioner.ExecuteCommand("@execute", string.Join(" ", args.ToArray()));
            }

            return true;
        }
        #endregion

        public static void Log(string message) {
            App.Log(message, MessageType.Error);
        }
        public static void Log(string message, MessageType type) {
            System.Console.WriteLine(message);
        }
    }
}
    